# coding=utf-8 
#!/usr/bin/env python

import config
import hashlib
import uuid
       
##-----
## Miscellaneous non web utilities
##-----    

def unique_name(label='', prefix = ''):
    '''Create unique names for testing purposes'''
    if prefix + label == '':
        uscore = ''
    else:
        uscore = '_'
         
    unique_id = unicode(uuid.uuid1().time)       
    return unicode(prefix + label + uscore + unique_id)


if __name__ == '__main__':
    print 'starting...'
    print unique_name()
    print unique_name()
    

#    p = "thequickbrownfoxjumpsoverthelazydog"
#    h = encrypt(p,'test')
#    print 10, h
#    print 20, valid_password(p,h,'test')
#    print 30, valid_password(p,h) # false
#    h = encrypt(p)
#    print 40, h
#    print 50, valid_password(p,h)
#    print 60, valid_password(p,h,'test') # false
#    print 70, unique_id()
#    print unique_name('user')
    print 'done!'
    
      
